package app;

import java.io.File;
import java.io.IOException;

import net.sf.javaml.core.Dataset;
import net.sf.javaml.core.DefaultDataset;
import net.sf.javaml.core.DenseInstance;
import net.sf.javaml.core.Instance;
import net.sf.javaml.tools.data.FileHandler;

public class app {
	
	public static final String FS = System.getProperty("file.separator");
	public static final String DATAINPUT = System.getProperty("user.dir")+ FS + "src" + FS + "data" + FS + "iris.data.txt";
	public static final String DATAOUTPUT = System.getProperty("user.dir")+ FS + "src" + FS + "data" + FS + "output.txt";
	
	
	public static void main(String[] arg) throws IOException
	{
		double[] values = new double[] { 1 , 2 , 3 , 4 ,5 ,6 ,7 ,8 ,9 ,10};
		
		Instance instance = new DenseInstance(values);
		
		Dataset dataset = new DefaultDataset();
		
		dataset.add(instance);
		
		System.out.println(dataset);
		
		Dataset data = FileHandler.loadDataset(new File(DATAINPUT), 4, ",");

		System.out.println(data);
		
		FileHandler.exportDataset(data, new File(DATAOUTPUT));
	}

}
